#include "nose.hpp"

void detectAndDrawNose(cv::Mat &img, const cv::Mat &faceROI, const cv::Rect &face, cv::CascadeClassifier &nose_cascade)
{
    std::vector<cv::Rect> noses;
    nose_cascade.detectMultiScale(faceROI, noses, 1.1, 2, 0 | cv::CASCADE_SCALE_IMAGE, cv::Size(30, 30));
    for (const auto &nose : noses)
    {
        cv::rectangle(img, cv::Point(face.x + nose.x, face.y + nose.y),
                      cv::Point(face.x + nose.x + nose.width, face.y + nose.y + nose.height),
                      cv::Scalar(255, 120, 0), 2);
    }
}
